//
//  ProjectManager.swift
//  StoreProject
//
//  Created by CYC on 1998/12/29.
//

// 管控项目

import UIKit

let kPManager = ProjectManager.shareInstance

private let ProjectManagerInstance = ProjectManager()

class ProjectManager: NSObject {
    
    // 根窗口
    var window: UIWindow?
    
    
    class var shareInstance: ProjectManager {
        return ProjectManagerInstance;
    }
    
    // MARK:显示启动页
    func toLanuchAction() {
        self.window?.rootViewController = BaseNavigationController.init(rootViewController: LaunchVC())
    }

    // MARK:切换到主页面
    func toMain() -> Void {
        
        if self.window != nil {
            
            self.window?.rootViewController = BaseTabBarController()
        }
    }
    // MARK:切换到登录页【退出登录】
    func toLogin() -> Void {
        
        
        if self.window != nil {
            
            self.window?.rootViewController = BaseNavigationController.init(rootViewController: LaunchVC())
        }
    }
    

}
